// 设备档案 模块

import { SystemSpace } from "@/api/interface/stop"
import { ResPage } from "@/api/interface/index"
import http from "@/api"

// ------------------生产设备------------------ //
// 停机管理 分页查询
export const stopPage = (params: SystemSpace.stopPageQuery) => {
  return http.post<ResPage<SystemSpace.stopPage>>("line/stop/plan/page", params)
}
// 删除停机计划
export const removeStopPlan = (params: { id: number }) => {
  return http.post<{ code: string; message?: string }>("line/stop/plan/remove", params)
}
// 新增停机计划
export const addStopPlan = (params: { lineIds: number[]; stopDay: string }) => {
  return http.post<{ code: string; message?: string }>("line/stop/plan/save", params)
}
// 获取指定日期已添加的停机产线
export const getAddedStopLines = (stopDay: string) => {
  return http.get<number[]>(`/line/stop/plan/list/added?stopDay=${stopDay}`)
}
